package com.usian.usianleadonewsuser.controller;

import com.usian.apis.service.user.AuthUserAppLoginControllerApi;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.user.dtos.LoginDto;
import com.usian.usianleadonewsuser.service.AuthAppService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/user/api/v1/login")
@RestController
public class AuthUserAppLoginController implements AuthUserAppLoginControllerApi {

    @Autowired
    private AuthAppService authAppService;

    @PostMapping("login_auth")
    @Override
    public ResponseResult login_auth(@RequestBody LoginDto dto) {
        return authAppService.login(dto);
    }
}
